package com.asman.vr.answer

import androidx.annotation.MainThread
import androidx.lifecycle.ViewModel
import com.asman.vr.dto.SchemeInfoDetailData
import com.asman.vr.dto.SchemeRepository
import com.asman.vr.network.CallAnswerRepository
import com.asman.vr.network.RejectAnswerBody

class CallAnswerViewModel(
    val repository: SchemeRepository,
    val callAnswerRepository: CallAnswerRepository
) : ViewModel() {

    var data: SchemeInfoDetailData? = null

    fun getSchemeInfoDetail(schemeId: Long, vrType: Int?) =
        repository.getSchemeInfoDetail(schemeId, vrType)

    fun rejectAnswer(body: RejectAnswerBody) = callAnswerRepository.rejectAnswer(body)

    fun canReceived(roomId: Int) = callAnswerRepository.canReceived(roomId)

    @MainThread
    fun submitTrtcLog(roomId: Int?, userId: Long?) =
        callAnswerRepository.submitTrtcLog(roomId, userId)


}
